﻿@using QDT.Core
@using QDT.MVC
@using QDT.Web
@using QDT.Web.Code.Enums
@model QDT.Core.Members.User
@{
    ViewBag.Title = "账户总览";
    var safeLevel = Html.F().GetUserSafeLevel(Model);
    var greet = new Greetings();
}
<style type="text/css">
    .up_grade
    {
        color: #ffffff;
        margin-left: 10px;
    }
    .up_grade:hover
    {
        color: red;
    }
    .passfalse:hover
    {
        color: #ffffff;
    }
    .ubabber_p{padding-top: 40px; color: #fff; text-align: left;}
    .ubabber_p p {
        font-size: 15px;
    }
</style>
<div align="center" style="position: relative; height: 130px; width: 100%;">
    <div>
        @if (greet.Morning())
        {<img src="/Content/Default/Images/Morning01.jpg" alt="" />}
        else
            if (greet.Noon())
            {<img src="/Content/Default/Images/Noon01.jpg" alt="" /> }
            else
                if (greet.Afternoon())
                {<img src="/Content/Default/Images/Afternoon01.jpg" alt="" />}
                else
                    if (greet.Night())
                    {<img src="/Content/Default/Images/Night01.jpg" alt="" />}
                    else
                        if (greet.Evening())
                        {<img src="/Content/Default/Images/Evening01.jpg" alt="" />}
    </div>
    <div style="margin: 0 auto; width: 980px; position: relative; height: 130px; margin-top: -134px">
        <div style="position: absolute; width: 100%;">
            <div style="float: left; height: 80px; width: 120px; margin-top: 30px;">
                <img src="/Content/Default/Images/user_head002.png" />
            </div>
            <div class="ubabber_p">
                @if (greet.Morning())
                {
                    <p>
                        <span style="font-size: 18px;">早上好！<em style="display: inline-block; margin: 0 10px;"></em><span>@(string.IsNullOrEmpty(Model.RealName) ? Model.UserName : Model.RealName)</span></span>
                        <span style="display: inline-block; margin-left: 40px; font-size: 15px;">奔跑吧！美好的一天从此刻开始…</span>
                    </p>
                }
                else if (greet.Noon())
                {
                    <p>
                        <span style="font-size: 18px;">中午好！<em style="display: inline-block; margin: 0 10px;"></em><span>@(string.IsNullOrEmpty(Model.RealName) ? Model.UserName : Model.RealName)</span></span>
                        <span style="display: inline-block; margin-left: 40px; font-size: 15px;">记得吃午餐，小憩一下…</span>
                    </p>
                }
                else if (greet.Afternoon())
                {
                    <p>
                        <span style="font-size: 18px;">下午好！<em style="display: inline-block; margin: 0 10px;"></em><span>@(string.IsNullOrEmpty(Model.RealName) ? Model.UserName : Model.RealName)</span></span>
                        <span style="display: inline-block; margin-left: 40px; font-size: 15px;">打起精神开始创造吧…</span>
                    </p>
                }
                else if (greet.Night())
                {
                    <p>
                        <span style="font-size: 18px;">晚上好！<em style="display: inline-block; margin: 0 10px;"></em><span>@(string.IsNullOrEmpty(Model.RealName) ? Model.UserName : Model.RealName)</span></span>
                        <span style="display: inline-block; margin-left: 40px; font-size: 15px;">今天收获了多少？</span>
                    </p>
                }
                else if (greet.Evening())
                {
                    <p>
                        <span style="font-size: 18px;">晚安！<em style="display: inline-block; margin: 0 10px;"></em><span>@(string.IsNullOrEmpty(Model.RealName) ? Model.UserName : Model.RealName)</span></span>
                        <span style="display: inline-block; margin-left: 40px; font-size: 15px;">知道您睡不着，我们再陪您一会儿…</span>
                    </p>
                }
                <hr style="margin: 12px 0; width: 430px; opacity: 0.5;" />
                <p>
                    <span>用户名：</span><span>@Model.UserName</span> <span style="display: inline-block;
                        margin: 0 20px;"><a href="@(Model.IDCardPassed ? Url.Action("SafeCenter") : Url.Action("BindIdCard"))" class="@(Model.IDCardPassed ? "passed" : "passfalse")" title="@(Model.IDCardPassed ? "已通过实名认证" : "请绑定身份证")">
                            <i style="@(Model.IDCardPassed ? "color:#fff" : "")" class="iconfont">&#xf00bb;</i></a>
                        <a href="@(Model.MobilePassed ? Url.Action("SafeCenter") : Url.Action("BindPhone"))" class="@(Model.MobilePassed ? "passed" : "passfalse")" title="@(Model.MobilePassed ? "已通过手机认证" : "请绑定手机号")">
                            <i style="@(Model.MobilePassed ? "color:#fff" : "")" class="iconfont">&#xe613;</i></a>
                        <a href="@(Url.Action("SafeCenter"))" class="@(Model.EmailPassed ? "passed" : "passfalse")" title="@(Model.EmailPassed ? "已通过邮箱认证" : "请绑定邮箱")">
                            <i style="@(Model.EmailPassed ? "color:#fff" : "")" class="iconfont">&#xe643;</i></a>
                        <a href="@(Url.Action("BindBankCard"))" class="@(Html.F().GetUserHasBank(Model.ID) > 0 ? "passed" : "passfalse")" title="@(Html.F().GetUserHasBank(Model.ID) > 0 ? "已绑定银行卡" : "请绑定银行卡")">
                            <i style="@(Model.IDCardPassed ? "color:#fff" : "")" class="iconfont">&#xe60e;</i></a>
                    </span><em>|</em> <span style="display: inline-block; margin: 0 20px;"><span>安全等级： </span>
                        <span style="color: #3bdb3c;">
                            @safeLevel
                        </span><span><a href="@Url.Action("SafeCenter")" class="up_grade">提升</a> </span>
                    </span><em>|</em> <span style="display: inline-block; margin: 0 20px;"><span>上次登录时间：</span>
                        <span>@Model.LoginTime</span> </span>
                </p>
            </div>
        </div>
    </div>
</div>
